#include<stdio.h>
#include<unistd.h>
#include<sys/shm.h>
#include<sys/ipc.h>
#include<string.h>

int main(){
    int shmid = shmget(0x67867888,1024,IPC_CREAT|0664);
    if(shmid<0){
        perror("shmget");
        return 0;
    }
    void* addr= shmat(shmid,NULL,0);
    if(addr<0){
        perror("shmat");
        return 0;
    }
    strcpy((char*)addr,"i am process A");
    sleep(50);
    shmdt(addr);
    return 0;
}
